//----- check for all checkbox is checked ------------------
//Input:    obj - doi tuong checkbox chinh (this) 
//Output:   NA
//ChungNN - 5/2006
//Exp: <input type=checkbox id=chkAll onlick="javascript:CheckAll(this);">
function getCheckBoxlList(obj, name, separate)
{
	
	var checkList = "";
	for(i=0; i<document.forms[0].elements.length; i++)
	{
			if(document.forms[0].elements[i].type =='checkbox' && document.forms[0].elements[i].name == name)
			if(document.forms[0].elements[i].checked == true){
				checkList+= document.forms[0].elements[i].value + separate;
			}
				
	}
   if(checkList.length>0)
   		checkList = checkList.substr(0, checkList.length-1);		
   
   return checkList;
   
}   

function getUnCheckBoxlList(obj, name, separate)
{
 	
	var checkList = "";
	for(i=0; i<document.forms[0].elements.length; i++)
	{
		if(document.forms[0].elements[i].type =='checkbox' && document.forms[0].elements[i].name == name)
		{	
			if(document.forms[0].elements[i].checked == false)			
				checkList+= document.forms[0].elements[i].value + separate;
		}		
	}
	
   if(checkList.length>0)
   		checkList = checkList.substr(0, checkList.length-1);		
   
   return checkList;
   
}   
